﻿using Network.Tcp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

namespace Network.TcpSelect;

public interface ITcpSelect
{
    public void PrepareFds()
    {
        RecvSockets?.Clear();
        lock (ConnectDataMutex)
        {
            RecvSockets = new List<Socket?>(ConnectDatas.Select(connectData => connectData.Socket));
        }
    }
    public List<Socket?>? RecvSockets { get; set; }
    protected object ConnectDataMutex{ get; }
    protected List<ConnectData> ConnectDatas{ get; }
}
